import 'package:flutter/material.dart';
import 'package:flutter_rider/main/widgets/ext/u_text.dart';
import 'package:flutter_rider/main/widgets/ui_constant.dart';
import 'package:flutter_rider/utils/screen_fit.dart';

class KvLayout extends StatelessWidget {
  String title;
  String value;
  double ? pixel;
  Widget ? wspace;
  KvLayout(this.title, this.value,  { this.pixel , this.wspace ,  Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        16.wspace,
        UText.get(title, UIColor.color_t3, pixel ?? 16.rpx),
        12.wspace,
        Expanded(child: UText.get(value, UIColor.color_t1,  pixel ?? 16.rpx, textAlign: TextAlign.right)),
        wspace ?? 16.wspace,
      ],
    );
  }
}